package com.lgh.ibs.log;

import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;

import com.lgh.ibs.plugins.Activator;

/**
 * @ClassName: IbsLogger 
 * @Description: 日志类
 * @date 2016年12月22日 上午11:35:58 
 * @author guohao.li
 */
public class IbsLogger {
	
	public static void ERROR(String message, Throwable exception){
		RuntimeException e = new RuntimeException();
		ILog log = Activator.getDefault().getLog();
		log.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID,0, 
				"IBS plugin log: " + message, exception));
	}
	public static void ERROR(String message){
		ILog log = Activator.getDefault().getLog();
		log.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID,0, 
				"IBS plugin log: " + message, null));
	}
	
	public static void INFO(String message){
		ILog log = Activator.getDefault().getLog();
		log.log(new Status(IStatus.INFO, Activator.PLUGIN_ID,0, 
				"IBS plugin log: " + message, null));
	}
	
	public static void OK(String message){
		ILog log = Activator.getDefault().getLog();
		log.log(new Status(IStatus.OK, Activator.PLUGIN_ID,0, 
				"IBS plugin log: " + message, null));
	}
	
	public static void WARNING(String message){
		ILog log = Activator.getDefault().getLog();
		log.log(new Status(IStatus.WARNING, Activator.PLUGIN_ID,0, 
				"IBS plugin log: " + message, null));
	}
	
	public static void CANCEL(String message){
		ILog log = Activator.getDefault().getLog();
		log.log(new Status(IStatus.CANCEL, Activator.PLUGIN_ID,0, 
				"IBS plugin log: " + message, null));
	}
	
}
